package com.tianchi.lexiang.background.util;

import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.tianchi.lexiang.util.DBOperator;

public class ClickRateResetUtil {

	private static final String TAG = "ClickRateResetUtil";
	private static final ClickRateResetUtil instance = new ClickRateResetUtil();
	private SQLiteDatabase db = DBOperator.getInstance().getConnection();

	public ClickRateResetUtil() {

	}

	public static ClickRateResetUtil getInstece() {
		return instance;
	}

	public boolean clickRateReset() {
		boolean isSuccess = true;
		ContentValues valueNew = new ContentValues();
		valueNew.put("SONGS_TEMP", 0);
		try {
			isSuccess = db.update("T_BDSM_SONGS", valueNew, null, null) > 0 ? true
					: false;
		} catch (Exception e) {
			Log.d(TAG, "exception===>" + e.toString());
			isSuccess = false;
		}
		return isSuccess;
	}
}
